/* common css */

body {
    min-width: 1270px;
    overflow: auto hidden;

    @include scrollbar_x(8px, var(--q-bg-scrollbar-thumb));
}

.f12 {
    font-size: var(--q-text-size-12);
}

.f14 {
    font-size: var(--q-text-size-14);
}

.f16 {
    font-size: var(--q-text-size-16);
}

.f18 {
    font-size: var(--q-text-size-18);
}

.m-r-4 {
    margin-right: 4px;
}

.m-r-8 {
    margin-right: 8px;
}

.m-r-16 {
    margin-right: 16px;
}

.m-r-24 {
    margin-right: 24px;
}

.m-l-8 {
    margin-left: 8px;
}

.m-l-16 {
    margin-left: 16px;
}

.m-l-4 {
    margin-left: 4px;
}

.m-l-6 {
    margin-left: 6px;
}

.m-l-12 {
    margin-left: 12px;
}

.m-l-24 {
    margin-left: 24px;
}

.m-l-32 {
    margin-left: 32px;
}

.m-b-1 {
    margin-bottom: 1px;
}

.m-b-4 {
    margin-bottom: 4px;
}

.m-b-8 {
    margin-bottom: 8px;
}

.m-b-12 {
    margin-bottom: 12px;
}

.m-b-16 {
    margin-bottom: 16px;
}

.m-b-18 {
    margin-bottom: 18px;
}

.m-b-24 {
    margin-bottom: 24px;
}

.m-t-4 {
    margin-top: 4px;
}

.m-t-8 {
    margin-top: 8px;
}

.m-t-14 {
    margin-top: 14px;
}

.m-t-16 {
    margin-top: 16px;
}

.m-t-24 {
    margin-top: 24px;
}

.m-t-32 {
    margin-top: 32px;
}

.m-t-46 {
    margin-top: 46px;
}

.p-l-8 {
    padding-left: 8px;
}

.p-r-8 {
    padding-right: 8px;
}

.p-b-6 {
    padding-bottom: 6px;
}

.p-t-8 {
    padding-top: 8px;
}

.p-b-8 {
    padding-bottom: 8px;
}

.l-h-32 {
    line-height: 32px;
}

.c-p {
    cursor: pointer;
}

.f-center {
    display: flex;
    align-items: center;
}

.f-column {
    display: flex;
    flex-direction: column;
}

.f-1 {
    flex: 1;
}

/* 面包屑导航动画 */
.fade-right {
    &-enter-from,
    &-leave-to {
        opacity: 0;
        transform: translateX(20px);
    }

    &-enter-active,
    &-leave-active {
        transition: all 0.5s;
    }

    &-enter-to,
    &-leave-from {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 页面切换 fade 动画 */
.fade-enter-active,
.fade-leave-active {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

.slide-left-enter-active,
.slide-left-leave-active,
.slide-right-enter-active,
.slide-right-leave-active {
    overflow: hidden;
    transition:
        transform 0.3s,
        opacity 0.3s;
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000;
}

.slide-right-enter-from,
.slide-left-leave-to {
    opacity: 0;
    transform: translateX(30px);
}

.slide-right-leave-to,
.slide-left-enter-from {
    opacity: 0;
    transform: translateX(-30px);
}

.list-move,
.list-enter-active {
    transition: all 0.5s ease;
}

.list-enter-from,
.list-leave-to {
    opacity: 0;
    transform: translateZ(0);
    transform: translateX(30px);
}

.fade-top-enter-from,
.fade-top-leave-to {
    opacity: 0;
    transform: translateY(-10px);
}

.fade-top-enter-active,
.fade-top-leave-active {
    transition:
        transform 0.2s var(--q-bounce-function),
        opacity 0.2s ease;
}

.q-zoom-enter-from,
.q-zoom-leave-to {
    opacity: 0.2;
}

.q-zoom-enter-active,
.q-zoom-leave-active {
    transition: opacity 0.2s;
}

/* 缩放 */
.scale-enter-from,
.scale-leave-to {
    opacity: 0.2;
    transform: scale(0.2);
}

.scale-enter-active,
.scale-leave-active {
    transition:
        transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s;
}

/* 确保将离开的元素从布局流中删除
  以便能够正确地计算移动的动画。 */
.list-leave-active {
    position: absolute;
    transition: all 0s;
    transform: translateZ(0);
}

/* 按钮 loading */
.u-btn__loading {
    margin-right: 8px;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* modal 全屏 */
.full-modal {
    .m-modal {
        top: 0 !important;
        width: 100% !important;
        padding-bottom: 0;
        margin: 0;
    }

    .m-modal__content {
        display: flex;
        flex-direction: column;
        height: calc(100vh);
    }

    .m-modal__body {
        flex: 1;
    }
}

/* mask loading */
.m-table__loading {
    z-index: 20;
}

/* form common */
.form-common {
    & > label {
        display: block;
        width: 18%;
        height: 32px;
        margin-right: 8px;
        font-size: 14px;
        line-height: 32px;
        color: var(--q-text-color);
        text-align: right;

        & > span {
            margin-right: 4px;
            color: red;
        }

        &.is-column {
            width: auto;
            text-align: left;
        }
    }
}

.m-error__text {
    position: absolute;
    bottom: -18px;
    left: 0;
    z-index: 13;
    font-size: 12px;
    line-height: 20px;
    color: var(--el-color-danger);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.fade-in.show {
    opacity: 1;
}

/* 文本内容溢出 */
.ellipsis {
    @include utils-ellipsis;
}

/* 虚拟输入填充类样式 */
.is-padding {
    color: var(--q-text-color-regular);
}

/* 占位符校验样式 */
.form-placeholder {
    position: relative;
    top: -10px;
}

/* link 文字 */
.m-link-primay {
    color: var(--q-color-primary);
}

.m-link {
    width: fit-content;
    max-width: 100%;
    font-size: 14px;
    line-height: 24px;
    cursor: pointer;

    &:hover {
        &::after {
            display: block;
            height: 0;
            content: '';
            border-bottom: 1px solid var(--q-color-primary);
        }
    }
}

.m-ellipsis {
    @include utils-ellipsis;
}

.copyright {
    position: absolute;
    bottom: -30px;
    width: 100%;
    font-size: 12px;
    color: var(--q-text-color-secondary);
    text-align: center;
}
.marginLeft {
    margin-left: 100px;
}
.prompt {
    bottom: -30px;
    font-size: 12px;
    position: absolute;
    left: 0;
    color: #f00;
}

.content-modal {
    border-radius: 8px;
}

.m-title {
    @include flex(space-between);
}

.m-title--common {
    display: inline-block;
    font-weight: 500;
    color: var(--q-text-color-primary);

    &::after {
        display: block;
        width: 100%;
        height: 4px;
        margin-top: 2px;
        content: '';
        background: linear-gradient(to bottom, #fff 0%, #06f 100%);
    }
}

.push-align--right {
    flex: 1;
    margin-right: 7px;
    text-align: right;
}

.drag-ghost {
    position: relative;

    &::after {
        position: absolute;
        inset: 0;
        z-index: 111;
        box-sizing: border-box;
        display: block;
        width: 100%;
        height: 100%;
        content: '';
        border: 1px solid rgb(0 102 255 / 70%);
    }
}

.hover-icon {
    cursor: pointer;

    &:hover {
        color: #06f;
    }
}
